/**
 * Generate time : 2011-12-19 14:32:54
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.ce.domain;

import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCEMaintenanceApply table comment : 维修申请
 */
public class ZMCEMaintenanceApply extends DaoEPBase {

	private String fdKeyId = " "; /* FD_KEY_ID */
	private String fdCode = " "; /* 申请单编号 */
	private String fdDepartmentId = " "; /* 申请部门ID */
	private String fdPerson = " "; /* 申请人 */
	private String fdEquipmentId = " "; /* 对应设备ID */
	private String fdDate = " "; /* 申请日期 */
	private String fdEquipmentQuestion = " "; /* 设备问题 */
	private String fdStatus = " "; /* 申请状态 */
	private String fdInvalidPerson = " "; /* 作废人 */
	private String fdInvalid = " "; /* 作废原因 */
	private String fdInvalidTime = " "; /* 作废时间 */
	private String fdRemarks = " "; /* 备注 */

	private String fdEquipmentCode = "";// 设备编号
	private String fdEquipmentName = "";// 设备名称

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("FD_KEY_ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdCode");
		eiColumn.setFieldLength(20);
		eiColumn.setDescName("申请单编号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdDepartmentId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("申请部门ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdPerson");
		eiColumn.setFieldLength(20);
		eiColumn.setDescName("申请人");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEquipmentId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("对应设备ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdDate");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("申请日期");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEquipmentQuestion");
		eiColumn.setFieldLength(250);
		eiColumn.setDescName("设备问题");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdStatus");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("申请状态");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdInvalidPerson");
		eiColumn.setFieldLength(20);
		eiColumn.setDescName("作废人");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdInvalid");
		eiColumn.setFieldLength(250);
		eiColumn.setDescName("作废原因");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdInvalidTime");
		eiColumn.setFieldLength(20);
		eiColumn.setDescName("作废时间");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdRemarks");
		eiColumn.setFieldLength(250);
		eiColumn.setDescName("备注");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEquipmentCode");// 新加列
		eiColumn.setFieldLength(40);
		eiColumn.setDescName("设备编号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEquipmentName");// 新加列
		eiColumn.setFieldLength(40);
		eiColumn.setDescName("设备名称");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZMCEMaintenanceApply() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - FD_KEY_ID
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - FD_KEY_ID
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdCode - 申请单编号
	 * 
	 * @return the fdCode
	 */
	public String getFdCode() {
		return this.fdCode;
	}

	/**
	 * set the fdCode - 申请单编号
	 */
	public void setFdCode(String fdCode) {
		this.fdCode = fdCode;
	}

	/**
	 * get the fdDepartmentId - 申请部门ID
	 * 
	 * @return the fdDepartmentId
	 */
	public String getFdDepartmentId() {
		return this.fdDepartmentId;
	}

	/**
	 * set the fdDepartmentId - 申请部门ID
	 */
	public void setFdDepartmentId(String fdDepartmentId) {
		this.fdDepartmentId = fdDepartmentId;
	}

	/**
	 * get the fdPerson - 申请人
	 * 
	 * @return the fdPerson
	 */
	public String getFdPerson() {
		return this.fdPerson;
	}

	/**
	 * set the fdPerson - 申请人
	 */
	public void setFdPerson(String fdPerson) {
		this.fdPerson = fdPerson;
	}

	/**
	 * get the fdEquipmentId - 对应设备ID
	 * 
	 * @return the fdEquipmentId
	 */
	public String getFdEquipmentId() {
		return this.fdEquipmentId;
	}

	/**
	 * set the fdEquipmentId - 对应设备ID
	 */
	public void setFdEquipmentId(String fdEquipmentId) {
		this.fdEquipmentId = fdEquipmentId;
	}

	/**
	 * get the fdDate - 申请日期
	 * 
	 * @return the fdDate
	 */
	public String getFdDate() {
		return this.fdDate;
	}

	/**
	 * set the fdDate - 申请日期
	 */
	public void setFdDate(String fdDate) {
		this.fdDate = fdDate;
	}

	/**
	 * get the fdEquipmentQuestion - 设备问题
	 * 
	 * @return the fdEquipmentQuestion
	 */
	public String getFdEquipmentQuestion() {
		return this.fdEquipmentQuestion;
	}

	/**
	 * set the fdEquipmentQuestion - 设备问题
	 */
	public void setFdEquipmentQuestion(String fdEquipmentQuestion) {
		this.fdEquipmentQuestion = fdEquipmentQuestion;
	}

	/**
	 * get the fdStatus - 申请状态
	 * 
	 * @return the fdStatus
	 */
	public String getFdStatus() {
		return this.fdStatus;
	}

	/**
	 * set the fdStatus - 申请状态
	 */
	public void setFdStatus(String fdStatus) {
		this.fdStatus = fdStatus;
	}

	/**
	 * get the fdInvalidPerson - 作废人
	 * 
	 * @return the fdInvalidPerson
	 */
	public String getFdInvalidPerson() {
		return this.fdInvalidPerson;
	}

	/**
	 * set the fdInvalidPerson - 作废人
	 */
	public void setFdInvalidPerson(String fdInvalidPerson) {
		this.fdInvalidPerson = fdInvalidPerson;
	}

	/**
	 * get the fdInvalid - 作废原因
	 * 
	 * @return the fdInvalid
	 */
	public String getFdInvalid() {
		return this.fdInvalid;
	}

	/**
	 * set the fdInvalid - 作废原因
	 */
	public void setFdInvalid(String fdInvalid) {
		this.fdInvalid = fdInvalid;
	}

	/**
	 * get the fdInvalidTime - 作废时间
	 * 
	 * @return the fdInvalidTime
	 */
	public String getFdInvalidTime() {
		return this.fdInvalidTime;
	}

	/**
	 * set the fdInvalidTime - 作废时间
	 */
	public void setFdInvalidTime(String fdInvalidTime) {
		this.fdInvalidTime = fdInvalidTime;
	}

	/**
	 * get the fdRemarks - 备注
	 * 
	 * @return the fdRemarks
	 */
	public String getFdRemarks() {
		return this.fdRemarks;
	}

	/**
	 * set the fdRemarks - 备注
	 */
	public void setFdRemarks(String fdRemarks) {
		this.fdRemarks = fdRemarks;
	}

	/**
	 * @return the fdEquipmentCode
	 */
	public String getFdEquipmentCode() {
		return fdEquipmentCode;
	}

	/**
	 * @param fdEquipmentCode
	 *            the fdEquipmentCode to set
	 */
	public void setFdEquipmentCode(String fdEquipmentCode) {
		this.fdEquipmentCode = fdEquipmentCode;
	}

	/**
	 * @return the fdEquipmentName
	 */
	public String getFdEquipmentName() {
		return fdEquipmentName;
	}

	/**
	 * @param fdEquipmentName
	 *            the fdEquipmentName to set
	 */
	public void setFdEquipmentName(String fdEquipmentName) {
		this.fdEquipmentName = fdEquipmentName;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdCode")), fdCode));
		setFdDepartmentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDepartmentId")), fdDepartmentId));
		setFdPerson(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdPerson")), fdPerson));
		setFdEquipmentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEquipmentId")), fdEquipmentId));
		setFdDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDate")), fdDate));
		setFdEquipmentQuestion(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEquipmentQuestion")), fdEquipmentQuestion));
		setFdStatus(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdStatus")), fdStatus));
		setFdInvalidPerson(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdInvalidPerson")), fdInvalidPerson));
		setFdInvalid(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdInvalid")), fdInvalid));
		setFdInvalidTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdInvalidTime")), fdInvalidTime));
		setFdRemarks(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdRemarks")), fdRemarks));

		setFdEquipmentCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEquipmentCode")), fdEquipmentCode));// 新加字段
		setFdEquipmentName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEquipmentName")), fdEquipmentName));// 新加字段
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdCode", StringUtils.toString(fdCode, eiMetadata.getMeta("fdCode")));
		map.put("fdDepartmentId", StringUtils.toString(fdDepartmentId, eiMetadata.getMeta("fdDepartmentId")));
		map.put("fdPerson", StringUtils.toString(fdPerson, eiMetadata.getMeta("fdPerson")));
		map.put("fdEquipmentId", StringUtils.toString(fdEquipmentId, eiMetadata.getMeta("fdEquipmentId")));
		map.put("fdDate", StringUtils.toString(fdDate, eiMetadata.getMeta("fdDate")));
		map.put("fdEquipmentQuestion", StringUtils.toString(fdEquipmentQuestion, eiMetadata.getMeta("fdEquipmentQuestion")));
		map.put("fdStatus", StringUtils.toString(fdStatus, eiMetadata.getMeta("fdStatus")));
		map.put("fdInvalidPerson", StringUtils.toString(fdInvalidPerson, eiMetadata.getMeta("fdInvalidPerson")));
		map.put("fdInvalid", StringUtils.toString(fdInvalid, eiMetadata.getMeta("fdInvalid")));
		map.put("fdInvalidTime", StringUtils.toString(fdInvalidTime, eiMetadata.getMeta("fdInvalidTime")));
		map.put("fdRemarks", StringUtils.toString(fdRemarks, eiMetadata.getMeta("fdRemarks")));

		map.put("fdEquipmentCode", StringUtils.toString(fdEquipmentCode, eiMetadata.getMeta("fdEquipmentCode")));// 新加字段
		map.put("fdEquipmentName", StringUtils.toString(fdEquipmentName, eiMetadata.getMeta("fdEquipmentName")));// 新加字段

		return map;

	}
}